home *** CD-ROM | disk | FTP | other *** search
/ CU Amiga Super CD-ROM 17 / CU Amiga Magazine's Super CD-ROM 17 (1997)(EMAP Images)(GB)[!][issue 1997-12].iso / CUCD / Graphics / RTGmaster / includes / asm / rtgmaster / rtgsublibs.i < prev    next >
Encoding:
Text File  |  1997-09-22  |  15.5 KB  |  366 lines

  1. ;
  2. ;     $VER: rtgsublibs.i 1.006 (29 Jul 1996)
  3. ;
  4.  
  5.         IFND    RTGSUBLIBS_I
  6. RTGSUBLIBS_I    SET     1
  7.  
  8.         IFND    UTILITY_TAGITEM_I
  9.         Include "utility/tagitem.i"
  10.         ENDC
  11.  
  12.         IFND    EXEC_TYPES_I
  13.         Include "exec/types.i"
  14.         ENDC
  15.  
  16.         IFND    EXEC_NODES_I
  17.         Include "exec/nodes.i"
  18.         ENDC
  19.  
  20. * The TagItem ID's (ti_Tag values) for OpenRtgScreen()
  21. *
  22. * Information like width, height, screenmode to use, depth and overscan
  23. * information is located in the ScreenReq structure which must be passed
  24. * to OpenRtgScreen().  The RtgScreenModeReq() function creates these
  25. * ScreenReq structures for you.
  26.  
  27. ARGB32 EQU 1
  28. RGB24  EQU 2
  29. RGB16  EQU 4
  30. RGB15  EQU 8
  31. ABGR32 EQU 16
  32. BGR24  EQU 32
  33. BGR16  EQU 64
  34. BGR15  EQU 128
  35. RGBA32 EQU 256
  36. LUT8   EQU 512
  37. GRAFFITI EQU 1024
  38. RGB15PC  EQU 2048
  39. BGR15PC  EQU 4096
  40. RGB16PC  EQU 8192
  41. BGR16PC  EQU 16384
  42. BGRA32   EQU 32768
  43. Planar1  EQU 1
  44. Planar2  EQU 2
  45. Planar3  EQU 4
  46. Planar4  EQU 8
  47. Planar5  EQU 16
  48. Planar6  EQU 32
  49. Planar7  EQU 64
  50. Planar8  EQU 128
  51. Planar1I EQU 65536
  52. Planar2I EQU 131072
  53. Planar3I EQU 262144
  54. Planar4I EQU 524288
  55. Planar5I EQU 1048576
  56. Planar6I EQU 2097152
  57. Planar7I EQU 4194304
  58. Planar8I EQU 8388608
  59. PlanarEHB EQU 32768
  60. PlanarEHBI EQU 2147483648
  61.  
  62.  
  63.     ENUM TAG_USER+1           ;rtg_Tags (OpenRtgScreen)
  64.  
  65.     EITEM rtg_Buffers       ;[1] You can use this tag to specify the number
  66.                             ;of screen buffers for your screen.  Setting this
  67.                             ;to 2 or 3 will allow you to do Double or Triple
  68.                             ;buffering.  Valid values are 1, 2 or 3.
  69.     EITEM rtg_Interleaved   ;[FALSE] Specifying TRUE will cause bitmaps to
  70.                             ;be allocated interleaved.  OpenRtgScreen will
  71.                             ;fail if bitplanes cannot be allocated that way
  72.                             ;unlike Intuition/OpenScreenTagList().
  73.     EITEM rtg_Draggable     ;[TRUE] Specifying FALSE will make the screen
  74.                             ;non-draggable.  Do not use without good reason!
  75.     EITEM rtg_Exclusive     ;[FALSE] Allows screens which won't share the
  76.                             ;display with other screens.  Use sparingly!
  77.  
  78.     EITEM rtg_ChunkySupport ;[0] This LONG is used to indicate which
  79. ;                            ;Chunky modes this application supports.  A
  80. ;                            ;set bit means the mode is supported:
  81. ;    ;     
  82. ;    ;    | Pixels  | Pixel|Color| Pixel 
  83. ;    ; Bit|represent| size |space| layout
  84. ;    ;------------------------------------------------------------------
  85. ;    ;  0  TrueColor  LONG   RGB   %00000000 rrrrrrrr gggggggg bbbbbbbb  ARGB32
  86. ;    ;  1  TrueColor 3 BYTE  RGB   %rrrrrrrr gggggggg bbbbbbbb           RGB24
  87. ;    ;  2  TrueColor  WORD   RGB   %rrrrrggg gggbbbbb                    RGB16
  88. ;    ;  3  TrueColor  WORD   RGB   %0rrrrrgg gggbbbbb                    RGB15
  89. ;    ;  4  TrueColor  LONG   BGR   %00000000 bbbbbbbb gggggggg rrrrrrrr  ABGR32
  90. ;    ;  5  TrueColor 3 BYTE  BGR   %bbbbbbbb gggggggg rrrrrrrr           BGR24
  91. ;    ;  6  TrueColor  WORD   BGR   %bbbbbggg gggrrrrr                    BGR16
  92. ;    ;  7  TrueColor  WORD   BGR   %0bbbbbgg gggrrrrr                    BGR15
  93. ;    ;  8  TrueColor  LONG   RGB   %rrrrrrrr gggggggg bbbbbbbb 00000000  RGBA32
  94. ;    ;  9  ColorMap   BYTE   -     -                                     LUT8
  95. ;    ; 10  Graffiti   BYTE   -     - (Graffiti style chunky, very special)
  96. ;    ; 11  TrueColor  WORD   RGB   %gggbbbbb 0rrrrrgg                    RGB15PC
  97. ;    ; 12  TrueColor  WORD   BGR   %gggrrrrr 0bbbbbgg                    BGR15PC
  98. ;    ; 13  TrueColor  WORD   RGB   %gggbbbbb rrrrrggg                    RGB16PC
  99. ;    ; 14  TrueColor  WORD   BGR   %gggrrrrr bbbbbggg                    BGR16PC
  100. ;    ; 15  TrueColor  LONG   BGR   %bbbbbbbb gggggggg rrrrrrrr 00000000  BGRA32
  101. ;
  102. ;    ; This table is by no means complete.  There are probably more modes
  103. ;    ; available on common Amiga graphic cards, but I have no information
  104. ;    ; on them yet.  If you know about such modes please contact me.
  105. ;
  106. ;    ; Setting this LONG to zero means your application doesn't support
  107. ;    ; any Chunky orientated display modes.
  108. ;
  109.      EITEM rtg_PlanarSupport ;[0] This LONG is used to indicate which
  110. ;                            ;Planar modes this application supports.  A
  111. ;                            ;set bit means the mode is supported:
  112. ;    ; Bit 0: Indicates it supports 1 bitplane non-interleaved
  113. ;    ; Bit 1: Indicates it supports 2 bitplanes non-interleaved
  114. ;    ; (...)
  115. ;    ; Bit 7: Indicates it supports 8 bitplanes non-interleaved
  116. ;
  117. ;    ; Bit 16: Indicates it supports 1 bitplane interleaved
  118. ;    ; Bit 17: Indicates it supports 2 bitplanes interleaved
  119. ;    ; (...)
  120. ;    ; Bit 23: Indicates it supports 8 bitplanes interleaved
  121. ;
  122. ;    ; Bit 15: Indicates it supports EHB mode (6 bitplanes) non-interleaved
  123. ;    ; Bit 31: Indicates it supports EHB mode (6 bitplanes) interleaved
  124. ;
  125. ;    ; Note that all planar modes are color-mapped.  Bits 8-14 and 24-30
  126. ;    ; are unused for now, but could be used later to support planar modes
  127. ;    ; with even higher number of bitplanes.
  128. ;
  129. ;    ; Setting this LONG to zero means your application doesn't support
  130. ;    ; any Planar orientated display modes.
  131.  
  132.  
  133.  
  134.  
  135.      EITEM rtg_ZBuffer
  136.  
  137.      ; Should a Z-Buffer be allocated ? (Only for usage with rtgmaster 3D Extensions)
  138.  
  139.      EITEM rtg_Use3D
  140.  
  141.      ; Use the 3D Chips. (You can only do conventional Double/Triple-Buffering, if you do NOT use
  142.      ; them. If you use them, the Extra Buffers are used by the 3D Chips)
  143.  
  144. *** End of OpenRtgScreenTagList() enumeration ***
  145.  
  146.  
  147. * This structure is private and for the internal use of RtgMaster.library
  148. * and its sub-libraries ONLY.  This structure will change in the future.
  149.  
  150.  STRUCTURE RtgDimensionInfo,0
  151.   ULONG rdi_Width    ; in pixels
  152.   ULONG rdi_Height   ; in pixels
  153.   LABEL rdi_SIZEOF
  154.  
  155. * This structure is private and for the internal use of RtgMaster.library
  156. * and its sub-libraries ONLY.  This structure will change in the future.
  157.   
  158.  STRUCTURE ScreenMode,0
  159.   STRUCT sm_ScrNode,8     ; ln_Succ and ln_Pred from ListNode structure
  160.  
  161.   APTR  sm_Name
  162.   APTR  sm_Description    ; Description of the graphics board this mode
  163.                           ; requires.  For example: "Standard Amiga Chipset".
  164.                           ; Description should not be longer than 31
  165.                           ; characters including terminating NULL-byte.  This
  166.                           ; pointer might be zero so watch out.
  167.   ULONG sm_GraphicsBoard  ; The graphics board this mode requires
  168.   ULONG sm_ModeID         ; ModeID (depends on sm_GraphicsBoard)
  169.   STRUCT sm_Reserved,8    ; 8 bytes reserved space for use of the sub-library
  170.                           ; who creates this ScreenMode structure.  This is
  171.                           ; PRIVATE to the sub-library!
  172.  
  173.   ULONG sm_MinWidth       ; minimum width in pixels
  174.   ULONG sm_MaxWidth       ; maximum width in pixels
  175.   ULONG sm_MinHeight      ; minimum height in pixels
  176.   ULONG sm_MaxHeight      ; maximum height in pixels
  177.  
  178.   STRUCT sm_Default,rdi_SIZEOF  ; Standard width and height of this ScreenMode
  179.   STRUCT sm_TextOverscan,rdi_SIZEOF  ; Settable via preferences
  180.   STRUCT sm_StandardOverscan,rdi_SIZEOF  ; Standard overscan size
  181.   STRUCT sm_MaxOverscan,rdi_SIZEOF  ; Maximum width and height (without the
  182.                                     ; need for AutoScrolling).  Hardware
  183.                                     ; dependant.
  184.  
  185.   ULONG sm_ChunkySupport  ; This LONG is used to indicate which Chunky
  186.                           ; modes this ScreenMode supports.  A set bit
  187.                           ; means the mode is available.  See the
  188.                           ; rtg_ChunkySupport tag for more information.
  189.                           ; Note that the same ScreenMode may never
  190.                           ; use two different layouts (for example BGR
  191.                           ; and RGB)
  192.  
  193.   ULONG sm_PlanarSupport  ; This LONG is used to indicate which Planar
  194.                           ; modes this ScreenMode supports.  A set bit
  195.                           ; means the mode is available.  See the
  196.                           ; rtg_PlanarSupport tag for more information.
  197.                           ; Note that the same ScreenMode may never
  198.                           ; use both interleaved and non-interleaved
  199.                           ; layouts.
  200.  
  201.   ULONG sm_PixelAspect    ; For a PAL 320x256 screen you have to write
  202.                           ; this value here:  sm_PixelAspect =
  203.                           ; (320/4)/(256/3) * 65536
  204.                           ;
  205.                           ; This tells the relation between the height and
  206.                           ; the width of a single pixel on 4:3 screen.  For
  207.                           ; a 640x480 screen this value is 1*65536.
  208.  
  209.   ULONG sm_VertScan       ; Vertical scan rate of this screenmode
  210.                           ; (in Hz)
  211.   ULONG sm_HorScan        ; Horizontal scan rate of this screenmode
  212.                           ; (in Hz)
  213.   ULONG sm_PixelClock     ; Pixelclock rate (in Hz)
  214.   ULONG sm_VertBlank      ; Vertical blank rate of this screenmode
  215.                           ; (in Hz)  (How often the VBlank interupt
  216.                           ; is triggered)
  217.   ULONG sm_Buffers        ; The number of buffers this ScreenMode can
  218.                           ; can handle.  This should always be atleast
  219.                           ; 1, 2 if the Screen can do double-buffering
  220.                           ; and 3 if it can do triple-buffering.
  221.  
  222.   UWORD sm_BitsRed        ; The number of bits per gun for Red
  223.   UWORD sm_BitsGreen      ; The number of bits per gun for Green
  224.   UWORD sm_BitsBlue       ; The number of bits per gun for Blue
  225.  
  226.   LABEL sm_SIZEOF
  227.  
  228. * The TagItem ID's (ti_Tag values) for GetRtgScreenData()
  229. *
  230. * These tags are used to return data to the user about the RtgScreen
  231. * structure in a future compatible way.
  232.  
  233.     ENUM TAG_USER+1
  234.  
  235.     EITEM grd_Width         ;Gets you the Width in pixels of the screen
  236.     EITEM grd_Height        ;Gets you the Height in pixels of the screen
  237.     EITEM grd_PixelLayout   ;Gets you the pixellayout of the screen, see
  238.                             ;defines below.  This also tells you whether
  239.                             ;the screen is Chunky or Planar
  240.     EITEM grd_ColorSpace    ;Gets you the colorspace of the screen, see
  241.                             ;defines below
  242.     EITEM grd_Depth         ;The number of colors LOG 2.  For Planar modes
  243.                             ;this also tells you the number of bitplanes.
  244.                             ;Don't rely on this number except to get the
  245.                             ;number of colors for Chunky modes.
  246.     EITEM grd_PlaneSize     ;Tells you the number of bytes to skip to get
  247.                             ;to the next (bit)plane.  You can use this to
  248.                             ;find the start addresses of the other (bit)planes
  249.                             ;in Planar and in (BytePlane) Chunky modes
  250.     EITEM grd_BytesPerRow   ;The number of bytes taken up by a row.  This
  251.                             ;refers to one (bit/byte)plane only for modes
  252.                             ;working with planes.
  253.     EITEM grd_MouseX        ; The X coordinate of the mouse pointer
  254.     EITEM grd_MouseY        ; The Y coordinate of the mouse pointer
  255.     EITEM grd_BusSystem     ; To which Bussystem is the Board connected ?
  256.     EITEM grd_3DChipset     ; For the use of the 3D Extensions
  257.  
  258. grd_Z3 EQU 1 ; Zorro III
  259. grd_Z2 EQU 2 ; Zorro II
  260. grd_Custom EQU 3 ; Custom Chipset
  261. grd_RGBPort EQU 4 ; connected to RGB Port
  262. grd_GVP EQU 5 ; EGS 110 is connected to "special" bus of GVP Turbo Board
  263. grd_DDirect EQU 6 ; DraCo Direct Bus
  264.  
  265. * defines for grd_PixelLayout
  266.  
  267. grd_PLANAR     EQU 0    ; Non interleaved planar layout [X bitplanes/pixel]
  268. grd_PLANARI    EQU 1    ; Interleaved planar layout     [X bitplanes/pixel] 
  269. grd_CHUNKY     EQU 2    ; 8-bit Chunky layout           [BYTE/pixel]
  270. grd_HICOL15    EQU 3    ; 15-bit Chunky layout          [WORD/pixel]
  271. grd_HICOL16    EQU 4    ; 16-bit Chunky layout          [WORD/pixel]
  272. grd_TRUECOL24  EQU 5    ; 24-bit Chunky layout          [3 BYTES/pixel]
  273. grd_TRUECOL24P EQU 6    ; 24-bit Chunky layout          [3 BYTEPLANES/pixel]
  274. grd_TRUECOL32  EQU 7    ; 24-bit Chunky layout          [LONG/pixel] (RGBx or BGRx)
  275. grd_GRAFFITI   EQU 8    ; 8-bit Graffiti-type Chunky layout (very special...)
  276. grd_TRUECOL32B EQU 9    ; 24-bit Chunky layout          [LONG/pixel] (xRGB or xBGR)
  277.  
  278. * defines for grd_ColorSpace
  279.  
  280. grd_Palette    EQU 0    ; Mode uses a Color Look-Up Table (CLUT)
  281. grd_RGB        EQU 1    ; standard RGB color space
  282. grd_BGR        EQU 2    ; high-endian RGB color space, BGR
  283. grd_RGBPC      EQU 3    ; RGB with lowbyte and highbyte swapped
  284. grd_BGRPC      EQU 4    ; BGR with lowbyte and highbyte swapped
  285.  
  286. *** End of GetRtgScreenData() enumeration ***
  287.  
  288.  
  289. * Information about the RtgScreenModeReq tags:
  290. *
  291. * Each tag specified for the RtgScreenModeReq() function limits in some
  292. * way the number of ScreenModes available to the user.  Sometimes this
  293. * means a screenmode is completely ommited, and sometimes this means
  294. * certain screenmodes can only be used if the user selects them to
  295. * be wide enough.  So for example, a ScreenMode which supports screens
  296. * of 300 to 400 pixels in width, could be filtered out completely by
  297. * setting smr_MinWidth to 401.  But if the smr_MinWidth is set to for
  298. * example 320 then the user is allowed to select a width of 320-400
  299. * pixels (for this ScreenMode, and if the smr_MaxWidth allows this).
  300. * If smr_MinWidth is 200 pixels then the ScreenMode is the limiting
  301. * factor which means the user can't select ScreenModes smaller than
  302. * 300 pixels.
  303. *
  304. * The PlanarSupport and ChunkySupport tags determine which ScreenModes
  305. * are available to the user depending on their layout and number of
  306. * colors.
  307.  
  308. * This structure is private and for the internal use of RtgMaster.library
  309. * and its sub-libraries ONLY.  This structure will change in the future.
  310.  
  311.  STRUCTURE ScreenReq,0
  312.   ULONG sq_ScreenMode ; Ptr to ScreenMode structure
  313.   ULONG sq_Width      ; Must be within Tag specified limits
  314.   ULONG sq_Height     ; The width and height which the user selected
  315.   UWORD sq_Depth      ; Number of colors log2 which the user selected
  316.   UWORD sq_Overscan   ; 0 = No Overscan.  See defines below.
  317.   UBYTE sq_Flags      ; Bit 0 set: EHB selected (sq_Depth = 6)
  318.                       ; Bit 1 set: Chunky mode
  319.                       ; Bit 2 set: Default X gadget selected
  320.                       ; Bit 3 set: Default Y gadget selected
  321.                       ; Bit 4 set: Autoscroll gadget selected
  322.                       ; Bit 5 set: B&W gadget selected
  323.   LABEL sq_SIZEOF
  324.  
  325.  STRUCTURE ScreenReqList,0
  326.   STRUCT srl_SRNode,8
  327.   APTR srl_req
  328.   LABEL srl_SIZEOF
  329.  
  330. * Bits set in sq_Flags
  331.  
  332. sq_EHB          EQU 1 ; EHB selected (sq_Depth = 6)
  333. sq_CHUNKYMODE   EQU 2 ; Chunky Mode selected
  334. sq_DEFAULTX     EQU 4 ; Default Width selected
  335. sq_DEFAULTY     EQU 8 ; Default Height selected
  336.  
  337.  
  338. * defines for sq_Overscan
  339.  
  340. sq_NOOVERSCAN        EQU 0
  341. sq_TEXTOVERSCAN      EQU 1   ; User setable, should be entirely visible
  342. sq_STANDARDOVERSCAN  EQU 2   ; Standard overscan (just past edges)
  343. sq_MAXOVERSCAN       EQU 3   ; Maximum overscan (as much as possible)
  344.  
  345. * This structure is private and for the internal use of RtgMaster.library
  346. * and its sub-libraries ONLY.  This structure will change in the future.
  347.  
  348.  STRUCTURE RtgScreen,0
  349.   ULONG rs_LibBase        ; Sub-library base for this ID
  350.   UWORD rs_LibVersion     ; Sub-library version for this ID
  351.   UWORD rs_Pad1
  352.   ULONG rs_GraphicsBoard  ; ID
  353.   STRUCT rs_Reserved,20
  354.   ULONG rs_MouseX
  355.   ULONG rs_MouseY
  356.   APTR  rs_c2pcode
  357.   APTR rs_c2pdata
  358.   ULONG rs_c2pcurr
  359.   STRUCT rs_c2pname,30
  360.   ; This structure is just a fixed-size header for the real sub library's
  361.   ; and graphics board's specific RtgScreen structure.  These are stored
  362.   ; in the rtgXXXX.i files
  363.   LABEL rs_SIZEOF
  364.  
  365.         ENDC
  366.